Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposing setting for overriding template directory #4324

Merged
merged 1 commit into from
Aug 4, 2020

Conversation

blarghmatey
Copy link
Contributor

#4189 What type of PR is this? (check all applicable)

  • Bug Fix

Description

When using some of the customized login flows such as REMOTE_USER the deployed site breaks due to not finding template files. This change updated the app default to use the existing Flask templates directory rather than the compiled static assets directory which only contains an index.html file.

@arikfr
Copy link
Member

arikfr commented Nov 13, 2019

Just to get the context for this:

When using some of the customized login flows such as REMOTE_USER the deployed site breaks due to not finding template files

How using the REMOTE_USER feature requires additional template files?

@arikfr
Copy link
Member

arikfr commented Dec 5, 2019

@blarghmatey did you see my question above?

@blarghmatey
Copy link
Contributor Author

@arikfr sorry for the slow reply. I remember looking through the specifics of the logic flow when I first ran into this after first deploying Re:Dash ~2 years ago, but as I recall the short version is that if using the remote user login feature (https://github.com/getredash/redash/blob/master/redash/authentication/remote_user_auth.py) it is trying to load the login template, which only exists under the template directory inside the app. By default it is only able to find the index.html template which bootstraps the frontend code, but fails to allow for loading any of the other existing templates. I have been running in production with this configuration for quite some time and am happy to provide more details of our settings and environment.

The majority of the configuration can be seen in our Salt repository here: https://github.com/mitodl/salt-ops/blob/master/pillar/apps/redash.sls#L46-L74

Please let me know if you have any other questions.

@blarghmatey
Copy link
Contributor Author

Just a quick ping to keep this PR visible @arikfr

@arikfr
Copy link
Member

arikfr commented Aug 2, 2020

@blarghmatey I was about to merge this, but then noticed that it picked up a few unrelated commits. Can you create a branch that has only the settings updates and I will merge it?

Thanks and sorry for keeping it open for so long.

When using some of the customized login flows such as `REMOTE_USER` the deployed site breaks due to not finding template files. This change updated the app default to use the existing Flask templates directory rather than the compiled static assets directory which only contains an index.html file.
@blarghmatey
Copy link
Contributor Author

Thanks for following up on this @arikfr. I just rebased my branch off of master so it should be ready to merge.

@arikfr arikfr merged commit d3b639a into getredash:master Aug 4, 2020
@arikfr
Copy link
Member

arikfr commented Aug 4, 2020

Merged 👍

andrewdever pushed a commit to andrewdever/redash that referenced this pull request Oct 5, 2020
When using some of the customized login flows such as `REMOTE_USER` the deployed site breaks due to not finding template files. This change updated the app default to use the existing Flask templates directory rather than the compiled static assets directory which only contains an index.html file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants